﻿@model ConfigDashboard.Models.ValueViewModel

@{
    ViewBag.Title = "Create Value";
}

<h2>Create Value</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Setting Value</legend>

        @Html.HiddenFor(model => model.Value.SettingID)

        @Html.HiddenFor(model => model.Value.EnvironmentID)

        <div class="editor-label">
            @Html.LabelFor(model => model.Value.SettingValue, string.Format("Enter value for {0} ({1} Environment)", Model.SettingName.SettingName, Model.Environment.EnvironmentName))
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Value.SettingValue)
            @Html.ValidationMessageFor(model => model.Value.SettingValue)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    <a href="@(Url.Action("Index") + "#" + Model.SettingName.SettingName)">« Back to List of Values</a>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
